#include "threadpool.hh"
#include <unistd.h>

int task1(int a, int b)
{
    return a + b;
}

void test1()
{
    ckf::ThreadPool& tp = ckf::ThreadPool::getInstance();

    auto ret1 = tp.submit(ckf::ThreadPool::LV1, task1, 0, 1);
    auto ret2 = tp.submit(ckf::ThreadPool::LV2, task1, 1, 1);
    auto ret3 = tp.submit(ckf::ThreadPool::LV3, task1, 2, 1);

    std::cout << ret1.get() << std::endl;
    std::cout << ret2.get() << std::endl;
    std::cout << ret3.get() << std::endl;

    // tp.stop();
}

int main()
{
    test1();
}